package com.osdp.sc.api.impl;

import com.osdp.sc.api.ITenantUserApi;
import com.osdp.sc.dto.TenantUserDTO;
import com.osdp.sc.service.IScTenantUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TenantUserApiImpl implements ITenantUserApi {

    @Autowired
    private IScTenantUserService ucTenantUserService;

    @Override
    public List<TenantUserDTO> queryTenantByUserId(String userId) {
        return ucTenantUserService.queryTenantByUserId(userId);
    }

    @Override
    public String getCurrentTenantId(List<TenantUserDTO> tenants, String tenantCode) {
        return ucTenantUserService.getCurrentTenantId(tenants,tenantCode);
    }
}
